<div style="margin-left:5px; margin-top:5px;">
<div class="perm-layout-1">
<label><input value="/tradeManager" type="checkbox" name="perms"/>交易管理</label>
<div>
<div class="perm-layout-2">
<label><input value="/product/sold" type="checkbox" name="perms"/>已卖出的宝贝 </label>
</div>
<div class="perm-layout-2">
<label><input value="/store/discussList,/store/discussView" type="checkbox" name="perms"/>评价管理 </label>
</div>
<div class="perm-layout-2">
<label><input value="/store/consultList,/store/consultReplay.jspx,/store/consultReplaySave.jspx" type="checkbox" name="perms"/>咨询管理 </label>
</div>
<div class="perm-layout-2">
<label><input value="/sell/list,/sell/view,/sell/v_excel.jspx" type="checkbox" name="perms"/>销售统计</label>
</div>
</div>
</div>
<div class="perm-layout-1">
<label><input value="/babyManger" type="checkbox" name="perms"/>宝贝管理 </label>
<div>
<div class="perm-layout-2">
<label><input value="/product/v_category.jspx,/product/v_add.jspx,/product/o_save.jspx" type="checkbox" name="perms"/>发布宝贝 </label>
</div>
<div class="perm-layout-2">
<label><input value="/product/v_list,/product/v_edit.jspx,/product/o_update.jspx,/product/v_standardTypes.jspx,/product/product_categorychild.jspx,/product/o_delete.jspx" type="checkbox" name="perms"/>出售中的宝贝 </label>
</div>
<div class="perm-layout-2">
<label><input value="/customerService/list,/customerService/add.jspx,/customerService/save.jspx,/customerService/edit.jspx,/customerService/update.jspxcustomerService/priority.jspx，/customerService/delete.jspx" type="checkbox" name="perms"/>在线客服 </label>
</div>
</div>
</div>
<div class="perm-layout-1">
<label><input value="/orderManger" type="checkbox" name="perms"/>订单管理</label>
<div>
<div class="perm-layout-2">
<label><input value="/orderSt/list,/orderSt/view.jspx,/orderSt/v_sendGoods.jspx,/orderSt/edit.jspx,/o_sendGoods.jspx" type="checkbox" name="perms"/>订单列表</label>
</div>
<div class="perm-layout-2">
<label><input value="/aftersaleSt/list,/aftersaleSt/view.jspx,/aftersaleSt/edit.jspx,/aftersaleSt/update.jspx,/aftersaleSt/demandlist.jspx,/aftersaleSt/demandRefundMoney.jspx" type="checkbox" name="perms"/>售后列表 </label>
</div>
<div class="perm-layout-2">
<label><input value="/adspace/list,/adspace/add.jspx,/adspace/save.jspx,/adspace/edit.jspx,/adspace/update.jspx,/adspace/delete.jspx" type="checkbox" name="perms"/>广告版位列表 </label>
</div>
<div class="perm-layout-2">
<label><input value="/advertise/list,/advertise/add.jspx,/advertise/save.jspx,/advertise/edit.jspx,/advertise/update.jspx,/advertise/delete.jspx" type="checkbox" name="perms"/>广告列表 </label>
</div>
</div>
</div>
<div class="perm-layout-1">
<label><input value="/deliverManger" type="checkbox" name="perms"/>物流管理 </label>
<div>
<div class="perm-layout-2">
<label><input value="/orderSt/deliverList" type="checkbox" name="perms"/>发货订单 </label>
</div>
<div class="perm-layout-2">
<label><input value="/shippingFro/list.jspx,/shippingFro/add.jspx,/shippingFro/edit.jspx,/shippingFro/save.jspx,/shippingFro/update.jspx,/shippingFro/delete.jspx,/shippingFro/priority.jspx" type="checkbox" name="perms"/>物流工具  </label>
</div>
</div>
</div>
<div class="perm-layout-1">
<label><input value="/storeManager" type="checkbox" name="perms"/>店铺管理  </label>
<div>
<div class="perm-layout-2">
<label><input value="/roleFro/list.jspx,/roleFro/save.jspx,/roleFro/edit.jspx,/roleFro/update.jspx" type="checkbox" name="perms"/>店铺角色管理  </label>
</div>
<div class="perm-layout-2">
<label><input value="/employee/list.jspx,/employee/add.jspx,/employee/save.jspx,/employee/edit.jspx,/employee/update.jspx" type="checkbox" name="perms"/>店铺基本设置  </label>
</div>
<div class="perm-layout-2">
<label><input value="/store/edit.jspx" type="checkbox" name="perms"/>店铺基本设置  </label>
</div>
<div class="perm-layout-2">
<label><input value="/type/list.jspx,/type/propertyList,/type/propertyAdd.jspx,/type/propertyEdit.jspx,/type/propertySave.jspx,/type/propertyUpdate.jspx,/type/propertyDelete.jspx" type="checkbox" name="perms"/>商品分类管理  </label>
</div>
<div class="perm-layout-2">
<label><input value="/balanceFro/list.jspx" type="checkbox" name="perms"/>结算记录   </label>
</div>
<div class="perm-layout-2">
<label><input value="/refund/refund_list.jspx,/refund/refund_view.jspx,/refund/refund_handle.jspx,/refund/apply_update.jspx" type="checkbox" name="perms"/>退款管理  </label>
</div>
<div class="perm-layout-2">
<label><input value="/storeCategory/list.jspx,/storeCategory/add.jspx,/storeCategory/save.jspx,/storeCategory/edit.jspx,/storeCategory/update.jspx/storeCategory/delete.jspx" type="checkbox" name="perms"/>店铺类目管理   </label>
</div>
<div class="perm-layout-2">
<label><input value="/report/list.jspx,/report/handle.jspx,/report/view.jspx,/report/update.jspx" type="checkbox" name="perms"/>店铺举报投诉管理  </label>
</div>
</div>
</div>
<div class="perm-layout-1">
<label><input value="/decorateManger" type="checkbox" name="perms"/>店铺装修 </label>
<div>
<div class="perm-layout-2">
<label><input value="/template/main.jspx,/template/left.jspx,/template/tree.jspx,/template/list.jspx,/template/rename.jspx,/template/o_rename.jspx,/template/add.jspx,/template/save.jspx,/template/edit.jspx,/template/o_update.jspx,/template/o_delete.jspx,/template/o_delete_single.jspx,/template/o_swfupload.jspx,/template/o_create_dir.jspx" type="checkbox" name="perms"/>模板定制 </label>
</div>
<div class="perm-layout-2">
<label><input value="/resource/main.jspx,/resource/left.jspx,/resource/tree.jspx,/resource/list.jspx,/resource/rename.jspx,/resource/o_rename.jspx,/resource/add.jspx,/resource/save.jspx,/resource/edit.jspx,/resource/o_update.jspx,/resource/o_swfupload.jspx,/resource/o_delete_single.jspx,/resource/o_create_dir.jspx" type="checkbox" name="perms"/>资源定制  </label>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(function() {
$(".perm-container input[type=checkbox]").bind("click",function() {
parentCheck(this);
childCheck(this);
});
});
function parentCheck(chk) {
var obj = $(chk).parent().parent().parent();
while(obj && obj.attr("class").indexOf("perm-container")==-1) {
if(chk.checked) {
$(obj.children()[0]).children().attr("checked",true);
}
obj = obj.parent();
}
}
function childCheck(chk) {
$(chk).parent().next().children().find("input[type=checkbox]").each(function(){this.checked=chk.checked});
}
</script>